#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>

typedef int ElemType;
//struct LNode {
//	ElemType data;
//	struct LNode* next;
//};
//struct LNode* p = (struct LNode*)malloc(sizeof(struct LNode));


typedef struct LNode
{
	ElemType data;
	struct LNode* next;
}LNode,*LinkList;

LNode* GetElem(LinkList L, int i)
{
	int j = 1;
	LNode* p = L->next;
	if (i == 0)
		return L;
	if (i < 1)
		return NULL;
	while (p != NULL && j < i)
	{
		p = p->next;
		j++;
	}
	return p;
}